Optimal. Leaf size=314 \[ -\frac{\sqrt{a+c x^2} \left (h x \left (2 a^2 f h^4+a c g h^2 (6 f g-e h)+c^2 \left (3 f g^4-d g^2 h^2\right )\right )+a^2 e h^5+a c g h^2 \left (d h^2+3 f g^2\right )+2 c^2 f g^5\right )}{2 h^3 (g+h x)^2 \left (a h^2+c g^2\right )^2}+\frac{c \tanh ^{-1}\left (\frac{a h-c g x}{\sqrt{a+c x^2} \sqrt{a h^2+c g^2}}\right ) \left (a^2 h^4 (4 f g-e h)+a c g h^2 \left (5 f g^2-d h^2\right )+2 c^2 f g^5\right )}{2 h^4 \left (a h^2+c g^2\right )^{5/2}}-\frac{\left (a+c x^2\right )^{3/2} \left (d h^2-e g h+f g^2\right )}{3 h (g+h x)^3 \left (a h^2+c g^2\right )}+\frac{\sqrt{c} f \tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right )}{h^4} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.505451, antiderivative size = 314, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.207, Rules used = {1651, 811, 844, 217, 206, 725} \[ -\frac{\sqrt{a+c x^2} \left (h x \left (2 a^2 f h^4+a c g h^2 (6 f g-e h)+c^2 \left (3 f g^4-d g^2 h^2\right )\right )+a^2 e h^5+a c g h^2 \left (d h^2+3 f g^2\right )+2 c^2 f g^5\right )}{2 h^3 (g+h x)^2 \left (a h^2+c g^2\right )^2}+\frac{c \tanh ^{-1}\left (\frac{a h-c g x}{\sqrt{a+c x^2} \sqrt{a h^2+c g^2}}\right ) \left (a^2 h^4 (4 f g-e h)+a c g h^2 \left (5 f g^2-d h^2\right )+2 c^2 f g^5\right )}{2 h^4 \left (a h^2+c g^2\right )^{5/2}}-\frac{\left (a+c x^2\right )^{3/2} \left (d h^2-e g h+f g^2\right )}{3 h (g+h x)^3 \left (a h^2+c g^2\right )}+\frac{\sqrt{c} f \tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right )}{h^4} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1651
Rule 811
Rule 844
Rule 217
Rule 206
Rule 725
Rubi steps
\begin{align*} \int \frac{\sqrt{a+c x^2} \left (d+e x+f x^2\right )}{(g+h x)^4} \, dx &=-\frac{\left (f g^2-e g h+d h^2\right ) \left (a+c x^2\right )^{3/2}}{3 h \left (c g^2+a h^2\right ) (g+h x)^3}-\frac{\int \frac{\left (-3 (c d g-a f g+a e h)-3 f \left (\frac{c g^2}{h}+a h\right ) x\right ) \sqrt{a+c x^2}}{(g+h x)^3} \, dx}{3 \left (c g^2+a h^2\right )}\\ &=-\frac{\left (2 c^2 f g^5+a^2 e h^5+a c g h^2 \left (3 f g^2+d h^2\right )+h \left (2 a^2 f h^4+a c g h^2 (6 f g-e h)+c^2 \left (3 f g^4-d g^2 h^2\right )\right ) x\right ) \sqrt{a+c x^2}}{2 h^3 \left (c g^2+a h^2\right )^2 (g+h x)^2}-\frac{\left (f g^2-e g h+d h^2\right ) \left (a+c x^2\right )^{3/2}}{3 h \left (c g^2+a h^2\right ) (g+h x)^3}+\frac{\int \frac{-6 a c \left (a h^2 (2 f g-e h)+c \left (f g^3-d g h^2\right )\right )+\frac{12 c f \left (c g^2+a h^2\right )^2 x}{h}}{(g+h x) \sqrt{a+c x^2}} \, dx}{12 h^2 \left (c g^2+a h^2\right )^2}\\ &=-\frac{\left (2 c^2 f g^5+a^2 e h^5+a c g h^2 \left (3 f g^2+d h^2\right )+h \left (2 a^2 f h^4+a c g h^2 (6 f g-e h)+c^2 \left (3 f g^4-d g^2 h^2\right )\right ) x\right ) \sqrt{a+c x^2}}{2 h^3 \left (c g^2+a h^2\right )^2 (g+h x)^2}-\frac{\left (f g^2-e g h+d h^2\right ) \left (a+c x^2\right )^{3/2}}{3 h \left (c g^2+a h^2\right ) (g+h x)^3}+\frac{(c f) \int \frac{1}{\sqrt{a+c x^2}} \, dx}{h^4}-\frac{\left (c \left (2 c^2 f g^5+a^2 h^4 (4 f g-e h)+a c g h^2 \left (5 f g^2-d h^2\right )\right )\right ) \int \frac{1}{(g+h x) \sqrt{a+c x^2}} \, dx}{2 h^4 \left (c g^2+a h^2\right )^2}\\ &=-\frac{\left (2 c^2 f g^5+a^2 e h^5+a c g h^2 \left (3 f g^2+d h^2\right )+h \left (2 a^2 f h^4+a c g h^2 (6 f g-e h)+c^2 \left (3 f g^4-d g^2 h^2\right )\right ) x\right ) \sqrt{a+c x^2}}{2 h^3 \left (c g^2+a h^2\right )^2 (g+h x)^2}-\frac{\left (f g^2-e g h+d h^2\right ) \left (a+c x^2\right )^{3/2}}{3 h \left (c g^2+a h^2\right ) (g+h x)^3}+\frac{(c f) \operatorname{Subst}\left (\int \frac{1}{1-c x^2} \, dx,x,\frac{x}{\sqrt{a+c x^2}}\right )}{h^4}+\frac{\left (c \left (2 c^2 f g^5+a^2 h^4 (4 f g-e h)+a c g h^2 \left (5 f g^2-d h^2\right )\right )\right ) \operatorname{Subst}\left (\int \frac{1}{c g^2+a h^2-x^2} \, dx,x,\frac{a h-c g x}{\sqrt{a+c x^2}}\right )}{2 h^4 \left (c g^2+a h^2\right )^2}\\ &=-\frac{\left (2 c^2 f g^5+a^2 e h^5+a c g h^2 \left (3 f g^2+d h^2\right )+h \left (2 a^2 f h^4+a c g h^2 (6 f g-e h)+c^2 \left (3 f g^4-d g^2 h^2\right )\right ) x\right ) \sqrt{a+c x^2}}{2 h^3 \left (c g^2+a h^2\right )^2 (g+h x)^2}-\frac{\left (f g^2-e g h+d h^2\right ) \left (a+c x^2\right )^{3/2}}{3 h \left (c g^2+a h^2\right ) (g+h x)^3}+\frac{\sqrt{c} f \tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right )}{h^4}+\frac{c \left (2 c^2 f g^5+a^2 h^4 (4 f g-e h)+a c g h^2 \left (5 f g^2-d h^2\right )\right ) \tanh ^{-1}\left (\frac{a h-c g x}{\sqrt{c g^2+a h^2} \sqrt{a+c x^2}}\right )}{2 h^4 \left (c g^2+a h^2\right )^{5/2}}\\ \end{align*}
Mathematica [A] time = 0.984721, size = 382, normalized size = 1.22 \[ \frac{\frac{h \sqrt{a+c x^2} \left (-\frac{(g+h x)^2 \left (6 a^2 f h^4+a c h^2 \left (h (2 d h-5 e g)+20 f g^2\right )+c^2 \left (11 f g^4-g^2 h (d h+2 e g)\right )\right )}{\left (a h^2+c g^2\right )^2}+\frac{(g+h x) \left (-3 a h^2 (e h-2 f g)+c g h (d h-4 e g)+7 c f g^3\right )}{a h^2+c g^2}-2 \left (h (d h-e g)+f g^2\right )\right )}{(g+h x)^3}+\frac{3 c \log \left (\sqrt{a+c x^2} \sqrt{a h^2+c g^2}+a h-c g x\right ) \left (a^2 h^4 (4 f g-e h)+a c g h^2 \left (5 f g^2-d h^2\right )+2 c^2 f g^5\right )}{\left (a h^2+c g^2\right )^{5/2}}-\frac{3 c \log (g+h x) \left (a^2 h^4 (4 f g-e h)+a c g h^2 \left (5 f g^2-d h^2\right )+2 c^2 f g^5\right )}{\left (a h^2+c g^2\right )^{5/2}}+6 \sqrt{c} f \log \left (\sqrt{c} \sqrt{a+c x^2}+c x\right )}{6 h^4} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.244, size = 5565, normalized size = 17.7 \begin{align*} \text{output too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sqrt{a + c x^{2}} \left (d + e x + f x^{2}\right )}{\left (g + h x\right )^{4}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.47842, size = 2321, normalized size = 7.39 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]